//
//  RGCommentView.h
//  RedGrass
//
//  Created by wukong on 2018/12/14.
//  Copyright © 2018年 hongcaosp. All rights reserved.
//

#import "BaseView.h"

@class RGCommentView;

@protocol  RGCommentViewDelegate<NSObject>

@optional

//触发编辑
//-(void) editCommentWithView:(RGCommentView *)view;

//加载评论
-(void) loadMainCommentListWithView:(RGCommentView *)view;

//加载更多评论
-(void) loadMoreMainCommentListWithView:(RGCommentView *)view;

//添加主评论
-(void) addMainCommentWithView:(RGCommentView *)view content:(NSString *)content;

//添加子评论
-(void) addChildCommentWithView:(RGCommentView *)view path:(NSIndexPath *)currentPath chosedIndex:(NSInteger)index content:(NSString *)content;


//图像点击


//点赞评论， 分主，子评论点赞

-(void) favoriteCommentWithView:(RGCommentView *)view chosedIndex:(NSInteger)index;

-(void) favoriteChildCommentWithView:(RGCommentView *)view chosedIndexPath:(NSIndexPath*)path;




@end

NS_ASSUME_NONNULL_BEGIN

@interface RGCommentView : BaseView

@property (weak, nonatomic) id<RGCommentViewDelegate> commentViewdelegate;
@property (assign, nonatomic) NSInteger currentIndex;


- (void)show;
- (void)dismiss;

//刷新评论
-(void) reloadCommentTabelViewWithCommentList:(NSMutableArray *)commentList;

//点赞主评论后刷新section
-(void) changeFarvoriteStatusWithIndex:(NSInteger) index;
//点赞子评论后刷新cell
-(void) changeFarvoriteStatusWithIndexPath:(NSIndexPath *) path;

//评论发送成功后，重置评论选择状态
-(void) resetCommentStauts;

//停止header刷新动画
-(void) commentMjHeaderLoadingEnd;

//停止footer刷新动画
-(void) commentMjFooterLoadingEnd;
//设置footer的状态为nomoredata
-(void) setCommentMjFooterStatusWithNoMoreData;

//不能给自己的评论点赞
-(void) showAlertWhenFarvoriteSelfComment;
//不能评论自己的评论
-(void) showAlertWhenCommentSelfComment;


@end

NS_ASSUME_NONNULL_END
